let obj = {
    name: "Hydra",
    age: 35
}

let sayHello = Symbol.for("sayHello");
Symbol.for("sex");

// symbol值作为对象的属性名，只能使用[]操作符
obj[sayHello] = function() {
    console.log("大家好！");
}

obj[Symbol.for("sex")] = "男";

obj[sayHello]();
console.log(obj[Symbol.for("sex")]);